package domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Order {
    private String id;                  // 订单编号
    private String raddr;               // 送货地址
    private String rname;               // 收货人姓名
    private String rphone;              // 收货人电话
    private String remail;              // 收货人邮箱
    private Date ordertime;             // 下单时间
    private int uid;                    // 订单所属用户
    private List<OrderItem> items = new ArrayList<>();    // 订单内的各个单项

    public String getRaddr() {
        return raddr;
    }

    public void setRaddr(String receiverAddress) {
        this.raddr = receiverAddress;
    }

    public String getRname() {
        return rname;
    }

    public void setRname(String receiverName) {
        this.rname = receiverName;
    }

    public String getRphone() {
        return rphone;
    }

    public void setRphone(String rphone) {
        this.rphone = rphone;
    }

    public List<OrderItem> getItems() {
        return items;
    }

    public void setItems(List<OrderItem> items) {
        this.items = items;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    public String getRemail() {
        return remail;
    }

    public void setRemail(String remail) {
        this.remail = remail;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    @Override
    public String toString() {
        return "Order [id=" + id + ", receiverAddress="
                + raddr + ", receiverName=" + rname
                + ", receiverPhone=" + rphone + ", receiverEmail=" + remail
                + ", ordertime=" + ordertime + ", uid=" + uid
                + ", orderItems=" + items + "]";
    }

}
